package com.wanda.model;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;
public class EmailModel extends Authenticator {
	/**
     * 用户名（登录邮箱）
     */
    private String username;
    /**
     * 密码
     */
    private String password;
  
    /**
     * 初始化邮箱和密码
     * 
     * @param username 邮箱
     * @param password 密码
     */
    public EmailModel(String username, String password) {
    this.username = username;
    this.password = password;
    }
  
    String getPassword() {
    return password;
    }
  
    @Override
    protected javax.mail.PasswordAuthentication getPasswordAuthentication() {
 
    	
    	return new PasswordAuthentication(username, password);
    }
  
    public String getUsername() {
    return username;
    }
  
    public void setPassword(String password) {
    this.password = password;
    }
  
    public void setUsername(String username) {
    this.username = username;
    }
  
}

